package com.graduationdesign.zengyan.graduationdesignapp.ui.base;

import com.graduationdesign.zengyan.graduationdesignapp.ui.base.errorhandle.BaseErrorView;
import com.graduationdesign.zengyan.graduationdesignapp.ui.base.errorhandle.ErrorConsumer;

import io.reactivex.disposables.CompositeDisposable;

/**
 * Created by ZengYan on 2018/4/24.
 *
 * @desc :
 */
public abstract class BasePresenter implements BaseContact.BasePresenter{

    protected final CompositeDisposable compositeDisposable;
    protected final ErrorConsumer mErrorConsumer;

    public BasePresenter(BaseErrorView baseErrorView) {
        this.mErrorConsumer = new ErrorConsumer(baseErrorView,provideTag());
        this.compositeDisposable = new CompositeDisposable();
    }

    protected abstract String provideTag();


    @Override
    public void subscribe() {

    }

    @Override
    public void unSubsrible() {
        compositeDisposable.clear();
    }


}
